﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping	xmlns="urn:nhibernate-mapping-2.2"
					default-lazy="false"
					assembly="Triton.Modules.Media"
					namespace="Triton.Media.Model">
	<class name="Triton.Media.Model.MediaType, Triton.Modules.Media" table="media_types">
		<id name="Id" unsaved-value="0" column="id">
			<generator class="hilo"/>
		</id>
		<version name="Version" column="version" type="integer" unsaved-value="0"/>

		<property name="Code" column="code" not-null="true" type="String" length="255"/>
		<property name="Description" column="description" not-null="false" type="String" length="500"/>

		<bag name="FileTypes" table="media_type_file_type" generic="true" cascade="all">
			<key column="media_type_id" foreign-key="FK_Media_Type_File_Type"/>
			<element column="file_type" type="string" length="50"/>
		</bag>
		
	</class>
</hibernate-mapping>